home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / satellit / pbsv004 / pbdebug.c < prev    next >
C/C++ Source or Header  |  1993-08-05  |  2KB  |  82 lines

  1. /* pbdebug.c 1993.8.6 */
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <assert.h>
  7.  
  8. #include "pbsv.h"
  9.  
  10. #ifdef DEBUG
  11.  
  12. extern int set_user(struct stuser*,char*,u_long,u_int);    /* pbsv.c */
  13. extern VOID initq(),putq();        /* pblib.c */
  14. extern struct stqcell *getq();
  15. extern VOID ca2ad(),ad2ca();
  16.  
  17. extern struct stqueue actuser;
  18. extern struct stqueue freeuser;
  19. extern struct stqueue freehole;
  20.  
  21. pbdebug()
  22. {
  23.     struct stuser *user;
  24.     struct sthole *hole;
  25.  
  26.     user = (struct stuser *)getq(&freeuser);
  27.     if (user == NULL) {
  28.         assert(0);
  29.     }
  30.     set_user(user,"JN2LHU",(u_long)0x3ebf,244);
  31.     hole = (struct sthole *)getq(&freehole);
  32.     if (hole == NULL) {
  33.         assert(0);
  34.     }
  35.     hole->offset = 0;
  36.     hole->length = 2067;
  37.     putq(&user->hole,hole);
  38. }
  39.  
  40. pbdebug2()
  41. {
  42.     struct stuser *user;
  43.     struct sthole *hole;
  44.  
  45.     user = (struct stuser *)getq(&freeuser);
  46.     if (user == NULL) {
  47.         assert(0);
  48.     }
  49.     hole = (struct sthole *)getq(&freehole);
  50.     if (hole == NULL) {
  51.         assert(0);
  52.     }
  53.     set_user(user,"JN2SBB",(u_long)0x3975,244);
  54.     hole->offset = 0;
  55.     hole->length = 30000;
  56.     putq(&user->hole,hole);
  57. }
  58.  
  59. pbdebug3()
  60. {
  61.     struct stuser *user;
  62.     struct sthole *hole;
  63.  
  64.     user = (struct stuser *)getq(&freeuser);
  65.     if (user == NULL) {
  66.         assert(0);
  67.     }
  68.     hole = (struct sthole *)getq(&freehole);
  69.     if (hole == NULL) {
  70.         assert(0);
  71.     }
  72.     set_user(user,"JN2LHU",(u_long)0,244);
  73.     user->flags = F_DIR;
  74.     hole->start = 0;
  75.     hole->end = (-1);
  76.     putq(&user->hole,hole);
  77. }
  78.  
  79. #endif
  80.  
  81. /* pbdebug.c */
  82.